package cn.itcast.mq.listener;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author Bill
 * @Date 2023-08-01 20:21
 */
@Component
public class SpringRabbitListener {

    // @RabbitListener(queuesToDeclare = @Queue("simple2.queue"))
    @RabbitListener(queues = "simple2.queue")
    public void listenerSimple2Queue(String message){
        System.out.println("消费者接收到消息!");

    }
}
